
-- $Id: MasterFrame.lua 72 2009-04-06 11:38:08Z Fylgjas $

-- ========================================================================= --
-- Copyright © 2009 Thomas ROBERT (aka Fylgjas EU - Marécage de Zangar)      --
-- ========================================================================= --
-- This file is part of FyLooter.                                            --
--                                                                           --
-- FyLooter is free software: you can redistribute it and/or modify it under --
-- the terms of the GNU General Public License as published by the Free      --
-- Software Foundation, either version 3 of the License, or (at your option) --
-- any later version.                                                        --
--                                                                           --
-- FyLooter is distributed in the hope that it will be useful, but WITHOUT   --
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     --
-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for  --
-- more details.                                                             --
--                                                                           --
-- You should have received a copy of the GNU General Public License along   --
-- with FyLooter. If not, see <http://www.gnu.org/licenses/>.                --
-- ========================================================================= --

local revision = tonumber(string.sub("$Rev: 72 $", 7, -3));

if (FyLooter.revision < revision) then
  FyLooter.revision = revision;
end

-- ========================================================================= --



-- ========================================================================= --

-- 
-- FyLooter:CreateMasterFrame()
--
function FyLooter:CreateMasterFrame(parent)
  -- MasterFrame
  local MasterFrame = CreateFrame("Frame", nil, parent);
  MasterFrame:Hide();
  MasterFrame:SetHeight(36);
  MasterFrame:SetBackdrop(FyLooter.db.settings.backdrop);

  -- MasterFrame.PayButton
  MasterFrame.PayButton = CreateFrame("Button", nil, MasterFrame, "UIPanelButtonGrayTemplate");
  MasterFrame.PayButton:SetID(1);
  MasterFrame.PayButton:SetWidth(80);
  MasterFrame.PayButton:SetHeight(22);
  MasterFrame.PayButton:SetPoint("LEFT", 7, 0);
  MasterFrame.PayButton:SetText("Pay Loot");
  MasterFrame.PayButton:GetNormalTexture():SetVertexColor(0.5, 1, 0.5);
  MasterFrame.PayButton:GetPushedTexture():SetVertexColor(0.5, 1, 0.5);

  -- MasterFrame.FreeButton
  MasterFrame.FreeButton = CreateFrame("Button", nil, MasterFrame, "UIPanelButtonGrayTemplate");
  MasterFrame.FreeButton:SetID(2);
  MasterFrame.FreeButton:SetWidth(80);
  MasterFrame.FreeButton:SetHeight(22);
  MasterFrame.FreeButton:SetPoint("CENTER");
  MasterFrame.FreeButton:SetText("Free Loot");
  MasterFrame.FreeButton:GetNormalTexture():SetVertexColor(0.5, 0.5, 1);
  MasterFrame.FreeButton:GetPushedTexture():SetVertexColor(0.5, 0.5, 1);

  -- MasterFrame.CancelButton
  MasterFrame.CancelButton = CreateFrame("Button", nil, MasterFrame, "UIPanelButtonGrayTemplate");
  MasterFrame.CancelButton:SetID(3);
  MasterFrame.CancelButton:SetWidth(80);
  MasterFrame.CancelButton:SetHeight(22);
  MasterFrame.CancelButton:SetPoint("RIGHT", -7, 0);
  MasterFrame.CancelButton:SetText("Cancel");
  MasterFrame.CancelButton:GetNormalTexture():SetVertexColor(1, 0.5, 0.5);
  MasterFrame.CancelButton:GetPushedTexture():SetVertexColor(1, 0.5, 0.5);
  
  return MasterFrame;
end

-- ========================================================================= --

